Method and apparatus for improving file system proxy performance and security by distributing information to clients via file handles

ABSTRACT

The preferred embodiment of the invention distributes, and effectively caches, information by inserting it into file handles that the proxy sends to clients. This information can be used to improve performance by eliminating the need for the proxy to generate additional requests to the server to establish file identity. The distributed information can also be intended to improve security, for example, by allowing the proxy to encode into the file handle a session key that expires after some amount of time.

BACKGROUND OF THE INVENTION

1. Technical Field

The invention relates to file systems. More particularly, the invention relates to a method and apparatus for improving file system proxy performance and security by distributing information to clients via file handles.

2. Description of the Prior Art

The Network File System (NFS), developed by Sun Microsystems, is the de facto standard for file sharing among UN*X hosts. NFS Version 3 is documented in RFC 1813. NFS is a stateless protocol. This means that the file server stores no per-client information, and there are no NFS connections. For example, NFS has no operation to open a file because this would require the server to store state information, e.g. that a file is open, what its file descriptor is, the next byte to read, etc. Instead, NFS supports a lookup procedure, which converts a filename into a file handle. This file handle is a unique, immutable identifier, usually an i-node number, or disk block address. NFS does have a read procedure, but the client must specify a file handle and starting offset for every call to read. Two identical calls to read yield the exact same results. If the client wants to read further in the file, it must call read with a larger offset.

A software program or appliance that is a proxy for the NFS protocol, or any other protocol that uses server-generated file handles, usually requires additional file metadata information to be stored either on the server or locally on the proxy, especially in the case of encrypting or authenticating client data, and also in the case of server virtualization, i.e. when serving as a single access point for clients, while providing them with access to several servers on the back end. This metadata can be used, for example, to apply different encryption keys, or to enforce access restrictions to files that are located in different logical units that are defined on the proxy, but possibly invisible to the file server.

Storage encryption appliances that secure data on NFS file servers are an example of a device that matches the above characteristics. Such an appliance forwards file handles generated by the file server to clients, and subsequently acts as a proxy for client requests for access to the file system on the server. Given a file handle from a client, the appliance needs to establish to what area (a.k.a. storage vault) the file belongs, and use the appropriate keys to encrypt or decrypt data. If the metadata used to establish this are not available on the proxy, as is typically the case with large file sets accessed by many client machines, the proxy must send additional requests to the file server to determine how to handle the client request correctly.

It would be advantageous to provide a mechanism that distributes, and effectively caches, information by inserting it into file handles that the proxy sends to clients. It would also be advantageous to provide a mechanism that improves performance by eliminating the need for the proxy to generate additional requests to the server to establish file identity.

SUMMARY OF THE INVENTION

The preferred embodiment of the invention distributes, and effectively caches, information by inserting it into file handles that the proxy sends to clients. This information can be used to improve performance by eliminating the need for the proxy to generate additional requests to the server to establish file identity. The distributed information can also be intended to improve security, for example, by allowing the proxy to encode into the file handle a session key that expires after some amount of time.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block schematic diagram that shows how a proxy appliance or software program can distribute information in client file handles according to the invention;

FIG. 2 is a block schematic diagram that shows how a proxy appliance or software program uses the information in client file handles when it receives a request from a client according to the invention; and

FIG. 3 is block schematic diagram that shows the additional operations that must be executed if the information is missing from the file handle.

DETAILED DESCRIPTION OF THE INVENTION

A proxy that is logically, i.e. in terms of data flow, located between clients and servers in general must remember certain information about the handles, or generally object identifiers, issued by a specific server to a specific client. For example, if the proxy serves more than one server, the proxy must remember which server issued a specific handle. This is necessary because the server name is not necessarily mentioned in future access by the client,

One approach is to keep a table inside the proxy. One disadvantage of doing so is the size of the table and the fact that this table might be lost if the proxy is rebooted. Saving such a table in a battery-backed RAM or some other non-volatile storage is possible, but expensive in terms of performance, cost, or both.

The preferred embodiment of the invention modifies the handle returned to the client. When the client asks the server to issue a handle, the handle is intercepted, and instead of returning the handles to the client as-is, additional information is encoded into the handle. Examples of such additional information include server name/ID, time, temporary session key, other cryptographic information, etc. One advantage of such application is that there is no need to keep a table in the proxy.

The preferred embodiment of the invention distributes, and effectively caches, information by inserting it into file handles that the proxy sends to clients. Information can be inserted into file handles in any of various ways. If the file handles are of a variable size, then additional bytes can be inserted at the beginning, at the end, or in any other possible way, and the size field can be updated to reflect the larger size. If file handles have a fixed size, there are other approaches that can be used. For example, some file servers do not use the full size of file handles and in this case the proxy can use the available space to store information before sending the file handles to clients.

This information can be used to improve performance by eliminating the need for the proxy to generate additional requests to the server to establish file identity. Performance improvements can be achieved by storing information, such as a key ID or some other type of metadata, in the file handle, and thus avoiding having to send additional requests to the file server when the file handle is used. The distributed information can also be intended to improve security, for example, by allowing the proxy to encode into the file handle a session key that expires after some amount of time, and/or to sign the file handle contents so that clients can not tamper with it. By implementing a session key in file handles, it is possible to require that at certain intervals, for example intervals in time or in usage, clients establish a session by using a client-side application that requires stronger authentication than that allowed by the plain storage protocol. For instance, the typical method of authenticating clients in the NFS protocol is to trust the user ID (UID) sent by the client machine, which is a very weak form of authentication. A more advanced form of authentication can be enforced by using an alternative program that mounts NFS exports and then embeds a session ID into the root file handles of those exports. Based on this session, the proxy can add data representing the session ID to each subsequently derived file handle. If the session expires under certain conditions, the client must authenticate again to access any data from the file server.

FIG. 1 is a block schematic diagram that shows how a proxy appliance or software program can distribute information in client file handles according to the invention. The presently preferred embodiment of the invention uses file handles sent to clients 10 by a proxy 12 to store information that is relevant to those file handles and the possible operations that can be executed with them. In this way, even long after the proxy has lost track of a specific file handle, e.g. because of limited memory, whenever the client that has the file handle requests an operation with it, for example, to WRITE a block of data to a file server 14, the necessary metadata are immediately available to the proxy from that same client file handle.

As shown FIG. 1, the client requests a file <filename> from the file server via the proxy using a LOOKUP call:<filename> which is passed via the proxy to the file server. The file server returns a LOOKUP reply:<file handle> to the proxy. The invention herein disclosed provides a mechanism by which the proxy inserts <metadata> into the file server's response to the client request and returns a LOOKUP reply:<<file handle>,<metadata> to the client. For example, in NFS version 3, if the file server returns a file handle of length 32 bytes, there are 32 more bytes available for inserting metadata. The file handle data from the server can be appended to that metadata, and the file handle size can be set to the sum of the length of the server file handle and the length of the proxy metadata. Alternatively, the client file handle can be obtained by combining the server file handle and the proxy metadata in some other way possibly, but not necessarily, involving cryptographic and/or compression transforms; or the file server file handle can be replaced completely.

FIG. 2 is a block schematic diagram that shows how a proxy appliance or software program uses the information in client file handles, e.g. WRITE:call<<file handle>, <metadata>, when it receives a request from a client according to the invention. The real file handle that is sent to the server then is the client file handle <file handle> without the metadata <metadata> that is only intelligible to the proxy. The metadata <metadata> serves its purpose by making it possible to handle the client request appropriately on the proxy, for example, by using the appropriate cryptographic keys to transform the data in the request or reply, or even by helping determine which server the request is ultimately intended for in the case of virtualization.

FIG. 3 is block schematic diagram that shows the additional operations that must be executed if file identity information is missing from the file handle. It can be seen when contrasting the example of FIG. 3, which shows the state of the art, with that of FIG. 2 that the WRITE call:<file handle> operation is streamlined when using the approach disclosed herein (FIG. 2) because file identity information is contained within the <metadata>, which is a part of the file handle. However, the state of the art approach requires an additional exchange between the proxy and the file server, i.e. READ:call<file handle> and READ reply:<metadata>, to establish file identity before the WRITE call:<file handle> operation may be performed.

Although the invention is described herein with reference to the preferred embodiment, one skilled in the art will readily appreciate that other applications may be substituted for those set forth herein without departing from the spirit and scope of the present invention.

For example, invention may be practiced with any protocols that allocate a handle or, in general, an identifier to each new storage object, e.g. a file, and require that further accesses to this object include this handle/ID instead of the name. Such protocols may be stateless or statefull. Further, the handle may be modified or supplanted entirely by metadata.

Accordingly, the invention should only be limited by the claims included below. 

1. A method for distributing and caching metadata related to files maintained in a file system, comprising the steps of: exchanging any of files, objects, and file-, object-related information between a file server and a client via an intermediary device; and using any of file handles and IDs to convey said metadata for use by said intermediary device and said client.
 2. The method of claim 1, further comprising the step of: using said metadata in said file handles for any of eliminating a need for said intermediary device to generate additional requests to said server to establish file identity, and for completing client requests.
 3. The method of claim 1, further comprising the step of: using said intermediary device to encode metadata in the form of a session key into said file handle that expires after a predetermined amount of time.
 4. The method of claim 1, wherein said file system is an NFS file system.
 5. The method of claim 1, wherein said file system uses a stateless protocol.
 6. In a file system using a stateless protocol, a method for distributing metadata with client file handles using a proxy or software program, comprising the steps of: inserting metadata into a file handle for use by a proxy and a client; and using a file handle sent to clients by said proxy to store metadata at said client that is relevant to said file handle and operations that can be executed with said file handle; wherein when a client that has said file handle requests an operation with said file handle, said metadata are immediately available to said proxy from said client file handle.
 7. The method of claim 6, wherein said operations comprise any: a WRITE operation to WRITE a block of data to a file server; a LOOKUP operation to LOOKUP a file in said file server; and a READ operation to READ a file in said file server.
 8. The method of claim 6, said inserting step comprising the step of: using a cryptographic key for any of transforming and signing data in a request, a reply, or the file handle.
 9. The method of claim 6, said inserting step comprising the step of: said metadata determining for which data location server a request is ultimately intended.
 10. In a file system, a method for using metadata associated with file handles, comprising the steps of: inserting metadata into a file handle for use by a proxy and a client; said proxy receiving a request from a client having a file handle containing said metadata, wherein said metadata is intelligible to said proxy; and sending a file handle to a file server without said metadata; wherein said metadata allows said proxy to execute said client request appropriately.
 11. The method of claim 10, said inserting step comprising the step of: using a cryptographic operation for any of transforming or signing data in a request, a reply or the file handle.
 12. The method of claim 10, said inserting step comprising the step of: said metadata determining for which file server a request is ultimately intended.
 13. An apparatus for distributing and caching metadata related to files maintained in a file system, comprising: a file server; a proxy; a client; means for exchanging files and file related information between said file server and said client via a proxy; and means for inserting said metadata into file handles for use by said proxy and said client.
 14. The apparatus of claim 13, further comprising: means for using said metadata in said file handles for any of eliminating a need for said proxy to generate additional requests to said server to establish file identity, and appropriately completing a client request.
 15. The apparatus of claim 13, further comprising: a session key for encoding said metadata into said file handle, wherein said session key expires after any of a predetermined amount of time and the occurrence of at least one predetermined condition.
 16. The apparatus of claim 13, wherein said file system is an NFS file system.
 17. The apparatus of claim 13, wherein said file system uses a stateless protocol.
 18. In a file system using a stateless protocol, an apparatus for distributing metadata with client file handles using a proxy or software program, comprising: means for inserting metadata into a file handle for use by said proxy and said client; and means for using a file handle sent to clients by a proxy to store metadata at said client that is relevant to said file handle and operations that can be executed with said file handle; wherein when a client that has said file handle requests an operation with said file handle, said metadata are immediately available to said proxy from said client file handle.
 19. The apparatus of claim 18, wherein said operations comprise any of: a WRITE operation to WRITE a block of data to a file server; a LOOKUP operation to LOOKUP a file in said file server; and a READ operation to READ a file in said file server.
 20. The apparatus of claim 18, said means for inserting comprising: a cryptographic operation for any of transforming and signing data in a request, a reply, or the file handle.
 21. The apparatus of claim 18, said means for inserting comprising: means for said metadata determining a file server for which a request is ultimately intended.
 22. In a file system, an apparatus for using metadata associated with file handles, comprising: means for inserting metadata into a file handle for use by a proxy and a client; means for said proxy receiving a request from a client having a file handle containing said metadata, wherein said metadata are intelligible to said proxy; and means for sending a file handle to a file server without said metadata; wherein said metadata allow said proxy to execute said client request appropriately.
 23. The apparatus of claim 22, said means for inserting comprising: a cryptographic operation for transforming data in a request or reply.
 24. The apparatus of claim 22, said means for inserting comprising: means for said metadata determining a file server for which a request is ultimately intended.
 25. A method for accessing a storage object with a client, comprising the steps of: said client initially interacting with a server; said client obtaining a storage object identifier; said client using said storage object identifier in connection with storage object transactions; said client associating metadata with said storage object identifier; and said client using said storage object identifier to convey said metadata.
 26. In a file system, a method for distributing metadata with client file handles using a proxy or software program, comprising the steps of: inserting metadata into a file handle for use by a proxy and a client; and using a file handle sent to clients by said proxy to store metadata at said client that is relevant to said file handle and operations that can be executed with said file handle; wherein when a client that has said file handle requests an operation with said file handle, said metadata are immediately available to said proxy from said client file handle.
 27. The method of claim 26, wherein said operations comprise any: a WRITE operation to WRITE a block of data to a file server; a LOOKUP operation to LOOKUP a file in said file server; and a READ operation to READ a file in said file server.
 28. The method of claim 26, said inserting step comprising the step of: using a cryptographic key for any of transforming and signing data in a request, a reply, or the file handle.
 29. The method of claim 26, said inserting step comprising the step of: said metadata determining for which data location server a request is ultimately intended. 